package com.ld.wms.business.chat.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ld.wms.business.chat.mapper.MaterialReceiveRankingMapper;
import com.ld.wms.business.chat.model.MaterialReceiveRankingModel;
import com.ld.wms.business.chat.service.MaterialReceiveRankingService;
import com.ld.wms.business.chat.vo.resp.MaterialReceiveRankingRespVo;
import com.ld.wms.common.vo.GenerateListVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 物料/试剂领用排行 服务实现类
 * </p>
 *
 * @author wangfeng
 * @since 2025-05-08
 */
@Service
public class MaterialReceiveRankingServiceImpl extends ServiceImpl<MaterialReceiveRankingMapper, MaterialReceiveRankingModel> implements MaterialReceiveRankingService {

    @Autowired
    private MaterialReceiveRankingMapper materialReceiveRankingMapper;

    @Override
    public GenerateListVo<MaterialReceiveRankingRespVo> getMaterialReceiveListTop10() {
        List<MaterialReceiveRankingRespVo> materialReceiveRankingRespVoList = materialReceiveRankingMapper.selectMaterialReceiveListTop10();
        return new GenerateListVo<>(materialReceiveRankingRespVoList);
    }
}
